// 店铺账号

import request from '@/utils/request'
import R from '@/types/conduit/R'
import { LoginParam } from '@/types/param/login'
import { LoginResponse } from '@/types/response/login'

export const login = (loginParam: LoginParam): Promise<R<LoginResponse>> =>
  request({
    url: `/shop/merchant-account/login`, // user是Controller类上的路径，login是方法上的路径
    method: 'POST',
    data: loginParam
  })
export const refreshToken = (refreshToken: string): Promise<R<AuthenticationTokens>> =>
  request({
    url: `/shop/merchant-account/refreshToken`, // user是Controller类上的路径，login是方法上的路径
    method: 'POST',
    params: { refreshToken }
  })
